package com.acme.bankapp.domain.bank;

import com.acme.bankapp.domain.bank.account.CheckingAccount;
import com.acme.bankapp.domain.bank.account.SavingsAccount;
import com.acme.bankapp.domain.bank.exception.ClientExistsException;
import com.acme.bankapp.domain.bank.exception.TooManyClients;

public class EmailServiceTest {

    public static void main(String[] args) throws InterruptedException {

        Bank bank = new Bank();
        Client client1 = new Client("Vasya", Gender.MALE, new SavingsAccount(200));
        Client client2 = new Client("Tanya", Gender.FEMALE, new CheckingAccount(100, 40));
        Client client3 = new Client("Vanya", Gender.MALE, new SavingsAccount(250));
        EmailService.sendNotificationEmail(new Email(client1, "address1"));
        EmailService.sendNotificationEmail(new Email(client2, "address2"));
        EmailService.sendNotificationEmail(new Email(client3, "address3"));

        Thread.sleep(20000);
        EmailService.close();
    }
}
